<?php echo $this->fetch('inc/header.html'); ?> 
<?php
$this->_var['dpagecss'][] = $this->_var['TMPL_REAL']."/css/add_item.css";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/upload_deal_item_image.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/upload_deal_item_image.js";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/edit_deal_item.js";
$this->_var['dcpagejs'][] = $this->_var['TMPL_REAL']."/js/edit_deal_item.js";
$this->_var['dpagejs'][] = $this->_var['TMPL_REAL']."/js/ajaxupload.js";
?>
<script type="text/javascript" src="<?php 
$k = array (
  'name' => 'parse_script',
  'v' => $this->_var['dpagejs'],
  'c' => $this->_var['dcpagejs'],
);
echo $k['name']($k['v'],$k['c']);
?>"></script>
<link rel="stylesheet" type="text/css" href="<?php 
$k = array (
  'name' => 'parse_css',
  'v' => $this->_var['dpagecss'],
);
echo $k['name']($k['v']);
?>" />
<div class="blank"></div>

<div class="shadow_bg">
	<div class="wrap white_box">

			<div class="page_title">
			回报设置 - <?php echo $this->_var['deal_item']['name']; ?> 
			</div>
			<div class="switch_nav">
				<ul>
					<li><a href="<?php
echo parse_url_tag("u:project#edit|"."id=".$this->_var['deal_item']['id']."".""); 
?>">项目介绍</a></li>		
					<li class="current"><a href="<?php
echo parse_url_tag("u:project#add_item|"."id=".$this->_var['deal_item']['id']."".""); 
?>">回报设置</a></li>					
				</ul>
			</div>
					
			<div class="blank"></div>
			
			<div class="add_item_tip">				
				<h1>小提示：</h1>
				<ul>
					<li>【建议设置3个以上的回报】，回报多样化更能提高关注度。</li>
					<li>【建议设置几十、几百、上千元的支持档位】，回报差异化更能满足不同人的需求。</li>
					<li>【建议设置有创意的回报】，与众不同的回报更能打动支持者。</li>
				</ul>
			</div>
			
			<div class="blank"></div>
			<div class="link_dash"></div>
			<div class="blank"></div>		
					
			<div id="add_item_form">
				<form class="ajax_form" id="item_form" action="<?php
echo parse_url_tag("u:project#save_deal_item|"."".""); 
?>" method="post">		
				<div class="public_left">									
						
						<div class="form_row">
							<div class="blank15"></div>
							<label class="title w100">支持金额:</label>
							<input type="text" value="<?php 
$k = array (
  'name' => 'round',
  'v' => $this->_var['item']['price'],
  'e' => '2',
);
echo $k['name']($k['v'],$k['e']);
?>" class="textbox" name="price" style="width:100px;" />
							<label class="tip_box">元</label>
							<div class="blank15"></div>
						</div>
		
						
						<div class="form_row">
							<label class="title w100">回报内容:</label>
							<textarea name="description" class="textarea"><?php echo $this->_var['item']['description']; ?></textarea>
							<div class="blank15"></div>
						</div>
						
						<div class="form_row">
							<label class="title w100">说明图片:</label>
							<div class="f_l">
								<label class="fileupload" onclick="upd_file(this,'image_file');">
								<input type="file" class="filebox" name="image_file" id="image_file"/>						
								</label>
								<label class="fileuploading hide" ></label>
								
							</div>
							<div class="blank15"></div>
						</div>
						
						<div class="form_row">
							<label class="title w100">是否配送:</label>
							<div class="select_box">
								<select name="is_delivery">
									<option value="0" <?php if ($this->_var['item']['is_delivery'] == 0): ?>selected="selected"<?php endif; ?>>否</option>
									<option value="1" <?php if ($this->_var['item']['is_delivery'] == 1): ?>selected="selected"<?php endif; ?>>是</option>
								</select>
							</div>
							<div class="blank15"></div>
						</div>
						
						<div class="form_row" style="display:none;">
	
							<label class="title w100">运费:</label>
							<input type="text" value="<?php 
$k = array (
  'name' => 'round',
  'v' => $this->_var['item']['delivery_fee'],
  'e' => '2',
);
echo $k['name']($k['v'],$k['e']);
?>" class="textbox" name="delivery_fee" style="width:100px;" />
							<label class="tip_box">元</label>
							<div class="blank15"></div>
						</div>
						
						<div class="form_row">
							<label class="title w100">是否限购:</label>
							<div class="select_box">
								<select name="is_limit_user">
									<option value="0" <?php if ($this->_var['item']['is_limit_user'] == 0): ?>selected="selected"<?php endif; ?>>否</option>
									<option value="1" <?php if ($this->_var['item']['is_limit_user'] == 1): ?>selected="selected"<?php endif; ?>>是</option>
								</select>
							</div>
							<div class="blank15"></div>
						</div>
						
						<div class="form_row" style="display:none;">

							<label class="title w100">限购人数:</label>
							<input type="text" value="<?php echo $this->_var['item']['limit_user']; ?>" class="textbox" name="limit_user" style="width:100px;" />
							<label class="tip_box">人</label>
							<div class="blank15"></div>
						</div>
						
						<div class="form_row">
					
							<label class="title w100">回报时间:</label>
							<label class="tip_box" style="padding-left:0px; padding-right:10px;">项目成功后</label>
							<input type="text" value="<?php echo $this->_var['item']['repaid_day']; ?>" class="textbox" name="repaid_day" style="width:100px;" />
							<label class="tip_box">天</label>
							<div class="blank15"></div>
						</div>
				</div><!--end left-->
				<div class="public_right">
					<div class="deal_preview_title">编辑预览</div>
					<div class="blank"></div>
					<div class="item_preview">
						<div id="support_price_box">支持￥<span id="support_price"><?php 
$k = array (
  'name' => 'round',
  'v' => $this->_var['item']['price'],
  'e' => '2',
);
echo $k['name']($k['v'],$k['e']);
?></span>元<div class="blank"></div></div>						
						<div>0位支持者&nbsp;&nbsp;&nbsp;&nbsp;<span id="limit_user_box" <?php if ($this->_var['item']['limit_user'] == 0): ?>style="display:none;"<?php endif; ?>>限额<span id="limit_user"><?php echo $this->_var['item']['limit_user']; ?></span>位,剩余<span id="remain_user"><?php echo $this->_var['item']['limit_user']; ?></span>位</span><div class="blank"></div></div>
						<div id="repaid_content"><?php 
$k = array (
  'name' => 'nl2br',
  'v' => $this->_var['item']['description'],
);
echo $k['name']($k['v']);
?></div>	
										
						<div id="image_box_outer" <?php if (! $this->_var['deal_item_images']): ?>style="display:none;"<?php endif; ?>>
							<div class="blank"></div>	
							<div id="image_box">				
								<?php $_from = $this->_var['deal_item_images']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'image');if (count($_from)):
    foreach ($_from AS $this->_var['image']):
?>
								
								<div class="image_item">
									<span></span>
									<img src="<?php 
$k = array (
  'name' => 'get_spec_image',
  'v' => $this->_var['image']['image'],
  'w' => '50',
  'h' => '50',
  'g' => '1',
);
echo $k['name']($k['v'],$k['w'],$k['h'],$k['g']);
?>" width=50 height=50 />
									<input type="hidden" name="image[]" value="<?php echo $this->_var['image']['image']; ?>"  />
								</div>
								
								<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
							</div>	
							<div class="blank1"></div>					
						</div>
						<div id="repaid_day_box">
							<div class="blank"></div>
							预计回报发放时间：项目成功结束后<span id="repaid_day"><?php echo $this->_var['item']['repaid_day']; ?></span>天内
							
						</div>
						<div id="delivery_box">
							<div class="blank"></div>
							运费 ￥<span id="delivery_fee_box"><?php 
$k = array (
  'name' => 'round',
  'v' => $this->_var['item']['delivery_fee'],
  'e' => '2',
);
echo $k['name']($k['v'],$k['e']);
?></span>
							
						</div>
						<div class="blank"></div>
						<div class="ui-button_green">
							<div>
								<span>支持￥<font id="support_price_btn"><?php 
$k = array (
  'name' => 'round',
  'v' => $this->_var['item']['price'],
  'e' => '2',
);
echo $k['name']($k['v'],$k['e']);
?></font>元</span>
							</div>
						</div>
						<div class="blank1"></div>
					</div>
				</div><!--end right-->
				<div class="blank"></div>
				<div class="add_item_btn" style="width:250px;">
				<div class="ui-button green" rel="green">
							<div>
								<span>保存回报设置</span>
							</div>
				</div>
				<a href="<?php
echo parse_url_tag("u:project#add_item|"."id=".$this->_var['deal_item']['id']."".""); 
?>">取消设置</a>
				</div>
				<div class="blank"></div>
				<input type="hidden" name="id" value="<?php echo $this->_var['item']['id']; ?>" />
				<input type="hidden" name="deal_id" value="<?php echo $this->_var['deal_item']['id']; ?>" />
				<input type="hidden" name="ajax" value="1" />
				</form>
			</div>
			<div class="blank"></div>
	
	</div>
</div>

<div class="blank"></div>
<?php echo $this->fetch('inc/footer.html'); ?> 


